/**
 * 
 */
package domain;

import java.io.Serializable;
import java.util.Set;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * @author yfekih
 *
 */

@Entity
@Table(name = "TB_MISSION")
public class Mission implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = -4348195666754184173L;
	
	public final static String ID_MISSION = "ID_MISSION";
	
	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	@Column(name = "ID", nullable = false)
	private Long id;

	@Column(name="DESCRIPTION")
	private String description;
	
	@Column(name="POINT_DEPART_X")
	private float positionDepartX;
	
	@Column(name="POINT_DEPART_Y")
	private float positionDepartY;
	
	@Column(name="POINT_DEPART_Z")
	private float positionDepartZ;
	
	@Column(name="POINT_ARRIVEE_X")
	private float positionArriveeX;
	
	@Column(name="POINT_ARRIVEE_Y")
	private float positionArriveeY;
	
	@Column(name="POINT_ARRIVEE_Z")
	private float positionArriveeZ;
	
	@Column(name="LIEU")
	private String lieu;
	
	@OneToMany(fetch=FetchType.EAGER, mappedBy= DroneMission.DRONE_MAPPING_NAME, cascade = {CascadeType.REMOVE})
	private Set<DroneMission> drones;

	/**
	 * @return the id
	 */
	public Long getId() {
		return id;
	}

	/**
	 * @param id the id to set
	 */
	public void setId(Long id) {
		this.id = id;
	}


	/**
	 * @return the description
	 */
	public String getDescription() {
		return description;
	}

	/**
	 * @param description the description to set
	 */
	public void setDescription(String description) {
		this.description = description;
	}


	public float getPositionDepartX() {
		return positionDepartX;
	}

	public void setPositionDepartX(float positionDepartX) {
		this.positionDepartX = positionDepartX;
	}

	public float getPositionDepartY() {
		return positionDepartY;
	}

	public void setPositionDepartY(float positionDepartY) {
		this.positionDepartY = positionDepartY;
	}

	public float getPositionDepartZ() {
		return positionDepartZ;
	}

	public void setPositionDepartZ(float positionDepartZ) {
		this.positionDepartZ = positionDepartZ;
	}

	public float getPositionArriveeX() {
		return positionArriveeX;
	}

	public void setPositionArriveeX(float positionArriveeX) {
		this.positionArriveeX = positionArriveeX;
	}

	public float getPositionArriveeY() {
		return positionArriveeY;
	}

	public void setPositionArriveeY(float positionArriveeY) {
		this.positionArriveeY = positionArriveeY;
	}

	public float getPositionArriveeZ() {
		return positionArriveeZ;
	}

	public void setPositionArriveeZ(float positionArriveeZ) {
		this.positionArriveeZ = positionArriveeZ;
	}

	/**
	 * @return the lieu
	 */
	public String getLieu() {
		return lieu;
	}

	/**
	 * @param lieu the lieu to set
	 */
	public void setLieu(String lieu) {
		this.lieu = lieu;
	}

}
